<template>
<div>
    <div class="e-form">
        <BillTop @cancel="printHandel"></BillTop>
        <div class="tabs warningTabs">
             <el-tabs tab-position="left" v-model="tabsName" @tab-click="onChangeTab">
                <!-- 基本信息 -->
                <el-tab-pane label="基本信息" name="baseInfo" :disabled="clickTabFlag"></el-tab-pane>
                <el-tab-pane label="结算明细" name="changeDetail" :disabled="clickTabFlag"></el-tab-pane>
                <el-tab-pane label="附件信息" name="changeHistory" :disabled="clickTabFlag"></el-tab-pane>
                <el-tab-pane label="审核历史" name="auditHistory" :disabled="clickTabFlag"></el-tab-pane>
                <div>
                    <div id="baseInfoCon" class="con">
                        <div class="tabs-title" id="baseInfo">基本信息</div>
                        <div style="width: 100%" class="form">
                <el-form ref="form" :model="formData" label-width="160px" >
                <el-row>
                    <el-col :span="12">
                         <el-form-item label="结算编号：" >
                            {{formData.billNo}}
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                         <el-form-item label="机构：" >
                            {{formData.orgName}}
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="结算单位：" >
                            {{formData.settleOrgName}}
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="合同编号：">
                              {{formData.contractNo}}
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                           <el-form-item label="进退场费：" >
                            {{formData.cost}}
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                          <el-form-item label="结算日期：" >
                            {{formData.settleDate}}
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="不含税金额(元)：" >
                             {{formData.taxExcludedAmount}}
                        </el-form-item>
                    </el-col>
                       <el-col :span="12">
                        <el-form-item label="税价合计(元)：" >
                           {{formData.totalTaxPrice}}
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="税率%：">
                          {{formData.taxRate}}
                        </el-form-item>
                    </el-col>
                     <el-col :span="12">
                        <el-form-item label="累计结算金额：" >
                           {{formData.totalSettleAmount}}
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="税额(元)：">
                            {{formData.taxAmount}}
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="录入人：" >
                            {{formData.inputName}}
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="发票号：">
                            {{formData.invoiceNo}}
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="币种：" >
                            {{formData.currency}}
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="本位币：">
                           {{formData.baseCurName}}
                        </el-form-item>
                    </el-col>
                     <el-col :span="12">
                        <el-form-item label="税价合计(本位币)：">
                           {{formData.baseTotalTaxPrice}}
                        </el-form-item>
                    </el-col>
                </el-row>
                     <el-row>
                <el-col :span="12">
                        <el-form-item label="本位币汇率：">
                             {{formData.baseTaxRate}}
                        </el-form-item>
                </el-col>
                    <el-col :span="12">
                        <el-form-item label="业务类型：">
                             周材租赁合同
                        </el-form-item>
                    </el-col>
                      </el-row>
                <el-row>
                     <el-col :span="12">
                        <el-form-item label="状态：">
                           {{stateLable(formData.state)}}
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="传财务共享：">
                            {{shareLable(formData.isSharing)}}
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="备注：">
                            <el-input placeholder="" v-model="formData.remarks" class="input-with-select" type="textarea"
                            :rows="3">
                            <span>
                                {{formData.remarks}}
                            </span>
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
                        </div>
                    </div>
                     <!-- 结算明细 tps-->
                    <div id="changeDetailCon" class="con">
                        <div class="tabs-title" id="changeDetail">结算明细</div>
                        <div class="e-table">
                            <!-- <div class="top">
                                <div class="left">
                                    <div>
                                        <el-button size="small" class="btn-blue">选择物资</el-button>
                                    </div>
                                </div>
                                <div class="right">
                                    合计：{{acceptanceData.totalAmount==null?0:acceptanceData.totalAmount}}
                                </div>
                            </div> -->
                           <div class="e-table">
                            <el-table
                                :data="acceptanceData"
                                border
                                ref="changeDetail"
                                style="width: 100%"
                                @cell-mouse-enter="cellMouseEnter"
                                @cell-mouse-leave="cellMouseLeave"
                                :row-class-name="tableRowClassName"
                                :header-cell-style="{ textAlign: 'center' }"
                                :cell-style="{ textAlign: 'center' }"
                                :tree-props="{
                                    children: 'children',
                                    hasChildren: 'hasChildren'
                                }"
                                :default-expand-all='true'
                                row-key="uuid"
                                class="table"
                                :max-height="$store.state.tableHeight"
                                v-sortTable="{ 'tableData': acceptanceData, '_this': this, 'ref': 'changeDetail' }"
                            >
                                <el-table-column
                                    prop="materialClassName"
                                    label="物资类别"
                                    fixed
                                    min-width="150"
                                >
                                </el-table-column>
                                <el-table-column
                                    prop="materialName"
                                    label="物资名称"
                                    fixed
                                    min-width="150"
                                >
                                </el-table-column>
                                <el-table-column prop="spec" label="规格"   min-width="150">
                                </el-table-column>
                                <el-table-column prop="texture" label="材质"  min-width="150">
                                </el-table-column>
                                <el-table-column prop="unit" label="计量单位"  min-width="150">
                                </el-table-column>
                                <el-table-column
                                    label="合同数量"
                                    min-width="150"
                                    prop="contractQuantity"
                                >
                                </el-table-column>
                                <el-table-column
                                    label="计时单位"
                                    min-width="150"
                                    prop="timeUnit"
                                >
                                </el-table-column>
                                <el-table-column
                                    label="本期结算数量"
                                    min-width="150"
                                    prop="settleQuantity"
                                >
                                </el-table-column>
                                 <el-table-column
                                    label="截止本期末累计结算数量"
                                    min-width="200"
                                    prop="currTotalQuantity">
                                </el-table-column>

                                <el-table-column
                                    label="租赁单价(元)"
                                    min-width="150"
                                    prop="price"
                                >
                                </el-table-column>

                                <el-table-column
                                    label="租赁时间"
                                    min-width="150"
                                    prop="leaseTime"
                                >
                                </el-table-column>

                                <el-table-column
                                    label="已租时间"
                                    min-width="150"
                                    prop="hasLeasedTime"
                                >
                                </el-table-column>

                                <el-table-column
                                    label="当期租金"
                                    min-width="150"
                                    prop="currAmount"
                                >
                                </el-table-column>
                                <el-table-column
                                    label="截止本期末累计结算租金"
                                    min-width="200"
                                    prop="currTotalAmount"
                                >
                                </el-table-column>
                            </el-table>
                        </div>
                        </div>
                    </div>
                    <div id="attachCon" class="con">
                        <div class="tabs-title" id="changeHistory">附件信息</div>
                        <AttachIndex :relationId="attachId" bucketName="facilityplan" isView/>
                    </div>

                    <div id="auditHistoryCon" class="con">
                        <div class="tabs-title" id="auditHistory">审核历史</div>
                        <div class="e-table">
                            <ComAuditHistoryIndex
                                @getAuditHistory="getAuditHistory"
                                billType=6098
                                ref="AuditHistoryRef"
                                :tableData.sync="auditHistoryTable"
                            />
                        </div>
                    </div>
                </div>
            </el-tabs>
            <div id="seat" :style="{ height: seatHeight + 'px' }"></div>
            <div class="buttons">
                 <PccExaButtons :auditState="auditState" @exas="exas" :founderId="formData.founderId" :state="formData.state"
                  :isPrint="formData.state == 1||formData.state == 2" />
                  <el-button
                    type="primary"
                    class="btn-blue"
                    @click="printHandel"
                    size="small"
                    v-debounce
                    >关闭</el-button
                >
            </div>
         </div>
    </div>
</div>

</template>

<script>
import { mapState, mapMutations } from 'vuex'
import '@/utils/jquery.scrollTo.min'
import AttachIndex from '@/components/common/attachIndex'
import ComAuditHistoryIndex from '@/pages/equipment/components/auditHistory/auditHistoryIndex'
import { openAppClient, hideLoading, throttle, getUuid, webprintReport, numToChinese  } from '@/utils/common'
import PccExaButtons from '@/components/common/exaButtons.vue'
import httpRequest from '@/api/settlementManagement/weeklyMaterialSettlement/rentalTradeIncome'
import publicRequest from '@/api/settlementManagement/publicRequest/publicRequest'

export default {
    data () {
        return {
            billId: this.$route.query.billid,
            auditHistoryTable: [], //审核历史表格
            tabsName: 'baseInfo',
            screenWidth: 0,
            screenHeight: 0,
            lastConHeight: 0,
            clickTabFlag: false, // 如果手动点击时，则不做滚动事件逻辑，只有滚动屏幕时才走滚动事件逻辑
            tableData: [],
            formData: {
                //配置计划基础信息
                rmbRate: '', //人名币汇率
                baseCurId: '', //本位币ID
                baseCurName: '', //本位币名称
                baseCurRate: '', //本位币汇率
                baseCurSettleAmount: 0, //结算金额（本位币）
                billId: '', //单据ID
                billNo: '', //单据编号
                currency: '', //币种
                currencyId: '', //币种ID
                isRed: 0, //是否红单
                isSharing: 0, //是否传财务共享
                nullifyCreated: '', //作废时间
                nullifyCreator: '', //作废人名称
                nullifyCreatorId: '', //作废人ID
                nullifyDescription: '', //作废描述
                nullifyReason: '', //作废原因
                operatorId: '', //经办人ID
                operatorName: '', //经办人名称
                orgId: '', //机构ID
                orgName: '', //机构名称
                parentId: '', //父级ID
                remarks: '', //备注
                settleAmount: 0, //结算金额
                settleDate: '', //结算日期 'settleDate': formatDate(new Date(), 'yyyy-MM-dd'),
                settleOrgId: '', //结算单位ID
                settleOrgName: '', //结算单位名称
                sourceId: '', //源单ID
                sourceNo: '', //源单编号
                state: 0, //状态
                taxAmount: 0, //税额
                taxRate: 0, //税率
                totalSettleAmount: 0, //累计结算金额
                workId: '', //流程id
            },
            //结算明细
            acceptanceData: [
                {
                    'children': [
                    ],
                    'topClassId': '',
                    'topClassName': '',
                    'totalAmount': 0,
                    'totalQuantity': 0,
                    'uuid': '45878szxzxsdsdwd'
                }
            ],
            changeHistoryTable: [], //变更历史表格
            changeHistorySelect: [], //变更历史选择项
            checkPerson: false,
            errorList: [], //控制导航栏感叹号的显示
            errorMsg: [], //计划明细错误显示
            isErrorMsg: true, //是否提醒错误信息
            auditState: {}, //流程按钮显示状态
            //提交审核参数
            auditParams: {
                'billId': this.$route.query.billid,
                'billType': 6098,
                'freeNextUnitIndex': 0,
                'freeNextUser': '',
                'isPass': true,
                'isShareInAudit': true,
                'opinion': ''
            },
            nullifyParams: { //作废
                'billId': this.$route.query.billid,
                'billType': 6098,
                'nullifyCreated': '',
                'nullifyCreator': '',
                'nullifyCreatorId': '',
                'nullifyDescription': '',
                'nullifyReason': ''
            },
            winEvent: {},
            //获取当前页面可以操作的按钮
            buttonParams: {
                'billId': this.$route.query.billid,
                'billType': 6098, // 对应模块Id
                'freeNextUnitIndex': 0,
                'freeNextUser': '',
                'isPass': true,
                'isShareInAudit': true,
                'opinion': ''
            },
        }
    },
    computed: {
        ...mapState({
            userInfo: state => state.userInfo,
            currencyForm: state => state.equip.equipData.currencyForm, //币种
        }),
        //根据状态值参数决定是否展示打印按钮
        stateLable () {
            return param=> {
                const state =  this.$store.state.equip.equipData.state
                const obj = state.find(x=>x.value === param)
                return (obj ?  obj.label :  '')
            }
        },
        //传输财务共享
        shareLable () {
            return param=> {
                const state =  this.$store.state.equip.equipData.shareFrom
                const obj = state.find(x=>x.value === param)
                return (obj ?  obj.label :  '')
            }
        },
        attachId () {
            return this.$route.query.billid
        },
        // 填补底部空白，以使高度够滚动
        seatHeight () {
            return this.screenHeight - 258 - this.lastConHeight
        },
    },
    components: {
        AttachIndex,
        ComAuditHistoryIndex,
        PccExaButtons
    },
    watch: {
        //给错误标签加上提醒
        errorList: newData=>{
            const tabs = document.querySelectorAll('.el-tabs__item')
            tabs.forEach(DOM=>{
                const { childNodes } = DOM
                if(childNodes.length > 1) {
                    DOM.removeChild(childNodes[1])
                }
            })
            newData.forEach(item=>{
                const itemDom = document.querySelector(`#tab-${item}`)
                var element = document.createElement('i')
                element.className = 'el-icon-warning-outline warning'
                itemDom.appendChild(element)
            })
        },
    },
    created () {
        this.formData.inputName = localStorage.getItem('userName')
        this.billid = this.$route.query.billid
        this.userId = localStorage.getItem('userId')
        this.formData.orgId = this.userInfo.orgInfo.orgId
    },
    mounted () {
        this.init()
        // 获取最后一个内容区域的高度，计算底部空白
        this.getLastConHeight()
        // 保存所有tabName
        const arr = ['baseInfo', 'changeDetail', 'changeHistory', 'auditHistory']
        this.tabArr = arr
        let $idsTop = []
        const onScroll = () => {
            // 如果手动点击时，则不做滚动事件逻辑，只有滚动屏幕时才走滚动事件逻辑
            if (this.clickTabFlag) {
                return
            }
            if (!$idsTop[$idsTop.length - 1]) {
                $idsTop = arr.map(item => {
                    const $item = document.getElementById(item)
                    let itemTop = null
                    if ($item) {
                        itemTop = $item.offsetTop
                    }
                    return itemTop
                })
            }
            const scrollTop = document.documentElement.scrollTop || document.body.scrollTop
            // 倒序查找
            let curLocal = 0
            for (let len = $idsTop.length, i = len - 1; i >= 0; i--) {
                let item = $idsTop[i]
                if (scrollTop + 1 >= item) {
                    curLocal = i
                    break
                }
            }
            // 设置对应tabName
            this.tabsName = arr[curLocal]
        }
        this.winEvent.onScroll = onScroll
        window.addEventListener('scroll', this.winEvent.onScroll)
        this.screenWidth = document.documentElement.clientWidth - this.topHeight
        this.screenHeight = document.documentElement.clientHeight - this.topHeight
        const onResize = () => {
            this.screenWidth = document.documentElement.clientWidth - this.topHeight
            this.screenHeight = document.documentElement.clientHeight - this.topHeight
            $idsTop = arr.map(item => {
                const itemTop = document.getElementById(item).offsetTop
                return itemTop
            })
        }
        this.winEvent.onResize = throttle(onResize, 500)
        window.addEventListener('resize', this.winEvent.onResize)
        this.scorllDtl()
    },
    beforeDestroy () {
        window.removeEventListener('scroll', this.winEvent.onScroll)
        window.removeEventListener('resize', this.winEvent.onResize)
    },
    methods: {
        ...mapMutations(['setSelectedInfo', 'setAuditParams']),
        //处理结算明细和赔偿明细数据
        setDetailsData (list) {
            list.forEach(item=>{
                item.materialClassName = item.topClassName
                item.uuid = getUuid()
                item.children && item.children.forEach(v=>{
                    v.uuid = getUuid()
                    v.parentId = item.uuid
                    v.children && v.children.forEach(t=>{
                        v.uuid = getUuid()
                        v.parentId = t.uuid
                    })
                })
            })
        },
        // 如果changeType是删除,则隐藏这一行
        tableRowClassName ({ row }) {
            if (row.changeType === -1) {
                return 'warning-row'
            }
            return ''
        },
        // elment表格事件
        cellMouseEnter (row) {
            this.MouseEnterId = row.billId
        },
        // elment表格事件
        cellMouseLeave () {
            this.MouseEnterId = 0
        },
        //刷新历史审核列表
        getAuditHistory () {
            publicRequest.adoptIdObtainGetAuditHistory(this.auditParams).then(res=>{
                this.auditHistoryTable = res
            })
        },
        //初始化数据
        init () {
            Promise.all([
                this.getInfo(),
                this.getAuditHistory(),
            ]).finally(() => {
                hideLoading()
            })
        },
        //获取基本信息数据查看页面
        getInfo () {
            //接口通用参数
            const params = {
                billId: this.billid,
            }
            // 获取基本信息 tps
            httpRequest.searchRentalTradeIncomeData({ id: this.billid }).then(res=>{
                this.formData = { ...res }
            })
            //获取结算明细
            httpRequest.searchRentalTradeIncomeDetailedcData(params).then(res=>{
                this.setDetailsData(res)
                this.acceptanceData = res
            })
            //获取当前页面可以操作的按钮
            publicRequest.adoptIdObtainGetButtonsData(this.buttonParams).then(res=>{
                res.canModify = false
                this.auditState = res
            })
        },
        //跳转到明细
        scorllDtl () {
            if(this.$route.query.name) {
                setTimeout(() => {
                // 因为dom异步加载，通过轮询找到渲染后的dom，获取高度
                    let obj = {
                        name: this.$route.query.name
                    }
                    this.tabsName = this.$route.query.name
                    this.onChangeTab(obj)
                }, 200)
            }
        },
        /*审核相关操作*/
        //作废
        nullify () {
            this.setAuditParams(this.nullifyParams)
            //客户端弹窗弹出本地页面
            openAppClient('/nullifyDialog', '单据作废原因', () => {
                const auditParams = JSON.parse(localStorage.vuex).auditParams
                publicRequest.adoptIdObtainToVoid(auditParams).then(() => {
                    this.clientPop('suc', '作废成功', ()=>this.printHandel ())
                })
            })
        },
        //撤回
        Withdraw () {
            publicRequest.adoptIdObtainWithdrawReview(this.auditParams).then(() => {
                this.clientPop('suc', '撤回成功', ()=>{
                    this.printHandel()
                })
            })
        },
        //删除
        deleteData () {
            this.clientPop(
                'info',
                '确定要删除吗？数据删除后不可恢复，请谨慎操作！',
                ()=>{
                    httpRequest.deleteRentalTradeIncomeData({ id: this.attachId }
                    ).then(res=>{
                        if(res.code == 200) {
                            this.clientPop('suc', '删除成功', ()=>{
                                this.printHandel()
                            })
                        }
                    })
                }
            )
        },
        //发起审核
        auditExamine () {
            this.setAuditParams(this.auditParams)
            // 客户端弹窗弹出本地页面
            openAppClient('/exaDialog', '填写审核意见', () => {
                const auditParams = JSON.parse(localStorage.vuex).auditParams
                publicRequest.adoptIdObtainSendOutReview(auditParams).then(() => {
                    this.clientPop('suc', '审核成功', ()=>{
                        this.printHandel()
                    })
                })
            })
        },
        //按钮事件
        async exas (arg) {
            //审核
            if (arg === 'audit') {
                this.auditExamine()
            //撤回
            } else if (arg === 'undoAudit') {
                this.Withdraw()
            //保存并提交
            } else if (arg === 'nullify') {
                this.nullify()
            //删除
            } else if (arg === 'deleteData') {
                this.deleteData()
            //打印
            } else if (arg === 'print') {
                this.printData()
            }
        },
        //打印
        printData () {
            const params =  {
                'reportTitle': '', //报表名
                'orgName': '', //单据机构
                'reportQRUri': '', //报表内容URI
                'billNo': '', //单据编码
                'summaryInfoItems': [], //基本信息
                'tables': [] //表格
            }
            //设置表格整体
            params.reportTitle = '周材租赁收入结算单'
            params.orgName = this.formData.orgName
            params.reportQRUri = window.location.href
            params.billNo = this.formData.billNo
            params.summaryInfoItems = this.setPrintInfo()
            params.tables.push(this.setTableData())
            params.tables.push(this.setAuditHistoryData())
            webprintReport(params)
        },
        //设置打印基本信息 tps
        setPrintInfo () {
            const target = []
            const data = this.formData
            //税价合计大写
            const capital = numToChinese(data.totalTaxPrice)
            const list = [
                ['结算编号', data.billNo, true],
                ['结算单位', data.settleOrgName, true],
                ['附件', '张', false],
                ['结算依据', data.contractNo, false],
                ['结算日期', data.settleDate, false],
                ['结算金额(不含税)', data.taxExcludedAmount, false],
                ['结算金额(含税)', data.totalTaxPrice, false],
                ['结算金额(含税)大写', capital, false],
                ['税率%', data.taxRate, false],
                ['发票编号', data.invoiceNo, false],
                ['币种', data.currency, false],
                ['本位币', data.baseCurName, false],
                ['备注信息', data.remarks, true],
            ]
            list.forEach(item=>{
            //设置基本信息参数
                const infoObj = {
                    'label': '标题',
                    'value': '内容',
                    'isFullRow': true //是否占整行
                }
                infoObj.label = item[0]
                infoObj.value = item[1]
                infoObj.isFullRow = item[2]
                target.push(infoObj)
            })
            return target
        },
        //设置打印的表格数据
        setTableData () {
            const obj = {
                'tableTitle': '结算清单',
                'tableContent': {
                    '物资类别': 'materialClassName',
                    '物资名称': 'materialName',
                    '规格型号': 'spec',
                    '材质': 'texture',
                    '计量单位': 'unit',
                    '合同数量': 'contractQuantity',
                    '计时单位': 'timeUnit',
                    '本期结算数量': 'settleQuantity',
                    '截止本期末累计结算数量': 'currTotalQuantity',
                    '租赁单价': 'price',
                    '租赁时间': 'leaseTime',
                    '已租时间': 'hasLeasedTime',
                    '当期租金': 'currAmount',
                    '截止本期末累计结算租金': 'currTotalAmount',
                },
                'tableData': this.acceptanceData[0].children, //表格数据
            }
            return obj
        },
        //添加审核历史
        setAuditHistoryData () {
            const obj = {
                'tableTitle': '审核历史',
                'tableContent': {
                    '审核级次': 'unitName',
                    '审核人': 'assignUser',
                    '审核人岗位': 'userTitle',
                    '审核时间': 'completeTime',
                    '审核意见': 'opinion',
                },
                'tableData': this.auditHistoryTable, //表格数据
            }
            return obj
        },
        // 获取最后一个内容区域的高度，计算底部空白
        getLastConHeight () {
            let si = setInterval(() => {
                // 因为dom异步加载，通过轮询找到渲染后的dom，获取高度
                const lastCon = document.getElementById('auditHistoryCon')
                if (lastCon) {
                    const lastConHeight = lastCon.offsetHeight
                    this.lastConHeight = lastConHeight
                    clearInterval(si)
                    si = null
                }
            }, 100)
        },
        onChangeTab (e) {
            const height  = $('#' + e.name).offset().top
            $.scrollTo(height - this.topHeight, 500)
            // 如果手动点击时，则不做滚动事件逻辑，只有滚动屏幕时才走滚动事件逻辑
            this.clickTabFlag = true
            // 动画结束后，恢复状态
            setTimeout(() => {
                this.clickTabFlag = false
            }, 600)
        },
        //操作成功后返回列表页面
        printHandel () {
            this.$router.replace('/rentalTradeIncomeList')
        },
    }
}

</script>

<style lang="scss" scoped>
.form {
    margin-top: 10px;
}

.e-table {
    background: #fff;
}
.handle {
    margin-top: 10px;
}
</style>
